Ext.onReady(function(){
    Ext.QuickTips.init();

    // turn on validation errors beside the field globally
    Ext.form.Field.prototype.msgTarget = 'side';

   // var bd = Ext.getBody();

    /*
     * ================  Simple form  =======================
     */
   // bd.createChild({tag: 'h2', html: 'Form 1 - Very Simple'});


    var simple = new Ext.FormPanel({
    	   frame:true,
           title: 'Car Pool',
          // bodyStyle:'padding:5px 5px 0',
           fieldDefaults: {
               msgTarget: 'side'
           },
        defaultType: 'textfield',

        
            items :[{
                fieldLabel: 'POOL ID',
                name: 'first',
                allowBlank:false,
                value:'1002'
            },{
                fieldLabel: 'Provider NAME',
                name: 'last',
                value:'Praveen Parsa'
            },{
                fieldLabel: 'SOURCE',
                name: 'source',
                value:'MehdiPatnam'
                
            }, {
                fieldLabel: 'DESTINATION',
                name: 'destination',
                value:'PatniPatnam'
            },
            {
            	 fieldLabel: 'START TIME',
                 name: 'starttime',
                 value:'8:00 AM'
            },
            {
           	 fieldLabel: 'END TIME',
                name: 'endtime',
                value:'6:00 PM'
           },{
            xtype:'fieldset',
            title: 'Rider Details',
            collapsible: false,
            defaultType: 'textfield',
            // layout: 'anchor',
            defaults: {
                anchor: '100%'
            },
            items :[{
                fieldLabel: 'Rider Name',
                name: 'rname',
                value: 'Samrat'
            },{
                fieldLabel: 'Rider Name',
                name: 'mobile',
                value:'Praveen'
            }]
    }
    ],
    buttons:[{
    	text:"Interested",
    	handler: function() {
        Ext.Msg.confirm("VCarPool","Are You Intrested");	
    }
    }]
    });

   simple.render('right');
    
});
